﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Windows.Forms;
using ROrganizer.UI.Controllers;
using ROrganizer.UI.Forms.Core;
using ROrganizer.UI.Properties;

namespace ROrganizer.UI.Forms
{
    internal partial class AboutForm : Form
    {
        private readonly AboutFormController controller;

        public AboutForm()
        {
            this.controller = new AboutFormController();
            this.InitializeComponent();

            this.pbImage.Image = Resources.Database;
            this.lblVersion.Text = "v" + this.controller.GetVersion();
        }

        private void OnOpenHomepageLink(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.ExecuteAndWatch(this.controller.OpenHomepage);
        }

        private void OnOpenSupport(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.ExecuteAndWatch(this.controller.OpenSupport);
        }

        private void OnSendFeedback(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.ExecuteAndWatch(this.controller.SendFeedback, this);
        }

        private void OnDonate(object sender, LinkLabelLinkClickedEventArgs e)
        {
        }
    }
}
